package erik.util;

public interface Comparator<T> {
	/**
	 * Return the result of comparing between t1 and t2.
	 * @param t1 the first object
	 * @param t2 the second object.
	 * @return < 0 if t1 is less than t2,
	 * 			 0 if t1 is equal to t2,
	 * 		   > 0 if t1 is greater than t2.
	 * @throws ClassCastException if object cannot be compared.
	 */
	int compare(T t1, T t2) throws ClassCastException;
}
